import { SysDataRule } from '@/model/dataRule';
import Http from '../http';

//获取菜单数据规则数据
export const getMenuDataRuleList = function (params: {menuId:string ,ruleType:number}) {
    return Http.get('/api/SysDataRule/GetMenuDataRuleList',params)
}

//获取当前规则使用按钮
export const getUseDataRuleButton = function (params: {ruleId:string}) {
  return Http.get('/api/SysDataRule/GetUseDataRuleButton',params)
}

 //获取数据规则
 export const getDataRuleList = async function (pageResultModel:any) {
  return await Http.post('/api/SysDataRule/GetDataRuleList',pageResultModel);
}

 //新增数据规则
 export const insert = function(sysDataRule: SysDataRule) {
   return Http.post('/api/SysDataRule/Insert', sysDataRule)
}

 //编辑数据规则
 export const update = function(sysDataRule: SysDataRule) {
   return Http.post('/api/SysDataRule/Update', sysDataRule)
}

//获取数据权限配置
export const GetDataRuleConfig = function (params: {menuId:string ,configType:number}) {
  return Http.get('/api/SysDataRule/GetDataRuleConfig',params)
}

